<template>
	<view>
		<!-- 客服中心首页-学生  -->
			<!-- 问题分类 -->
	<view class="issue">
		<view class="leftGreen"></view>
		<text>问题分类</text>
	</view>
	
	<view class="issueContent">
		<view class="issueItme" @tap="gotoCategory(1)">
			<image class="issueImg" src="../../static/image/sync-matter.png"></image>
			<text>同步问题</text>			
		</view>
		<view class="issueItme" @tap="gotoCategory(2)">
			<image class="issueImg" src="../../static/image/reward-matter.png"></image>
			<text>奖励问题</text>			
		</view>
		<view class="issueItme" @tap="gotoCategory(3)">
			<image class="issueImg" src="../../static/image/software-matter.png"></image>
			<text>软件问题</text>			
		</view>
		<view class="issueItme" @tap="gotoCategory(4)">
			<image class="issueImg" src="../../static/image/handle-matter.png"></image>
			<text>操作问题</text>			
		</view>
		<view class="issueItme" @tap="gotoCategory(5)">
			<image class="issueImg" src="../../static/image/complain-matter.png"></image>
			<text>我要投诉</text>			
		</view>
	</view>
		<!-- 灰色横线 -->
		<view class="gray"></view>
		
		<!-- 常见问题 -->
		<view class="issue">
			<view class="leftGreen"></view>
			<text>常见问题</text>
		</view>
		
		<!-- 常见问题列表 -->
		<view class="issueList">
			<!-- 常见问题每一项 -->
			<navigator hover-class="none" :url="'./matter-detail?item='+ encodeURIComponent(JSON.stringify(item))" class="issueListItme" v-for="(item,index) in datas" :key="index">
				<view class="title">
					<view class="circle"></view>
					<text>{{item.questionTitle}}</text>
				</view>
				<view class="iconfont iconfanhui">
				</view>
			</navigator>
		</view>
		<view class="base" style="margin-top:192upx;">其他问题请咨询在线客服</view>
		<view class="base">
			或联系客服热线
			<text @click="tel">4006-338-338</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				datas:[]
			}
		},
		onLoad() {
			this.getLists();
		},
		methods: {
		tel() {
			uni.makePhoneCall({
				phoneNumber: '4006-338-338' //仅为示例
			});
		},
		gotoCategory:function(type){
			uni.navigateTo({
				url:'matter-category?type='+type
			})
		},
		getLists:function(){
			this.$kapi.apiPost('customerService/selQuestionTypeInfo',{typeId:6,reqMethod:1}).then(res=>{
				var data=res.data;
				if(data.code==200){
					this.datas=data.date.serviceQuestionList;
				}else{
					uni.showToast({
						title:data.msg,
						icon:'none'
					});
				}
			});	
		}

		}
	}
</script>

<style>
	/* 操作分类 */
	.issue{
		display: flex;
		align-items: center;
		margin-top: 56upx;
		margin-left: 30upx;
		}
	.issue text{
		font-size: 32upx;
		font-weight: bold;
		color: #333333;
		line-height: 42upx;
	} 
	.leftGreen{
		width: 10upx;
		height: 36upx;
		background: #FF9900;
		margin-top: 9upx;
		margin-right: 15upx;
	}
	.issueContent{
		margin-top: 60upx;
		width: 100%;
		height: 130upx;
		display: flex;
		justify-content: space-between;
	}
	/* 操作每一项 */
	.issueItme{
		text-align:center; 
		width: 20%;
		height: 140upx;
		font-size: 24upx;
		color: #333333;
		line-height: 70upx;
		display: flex;
		align-items: center;
		flex-direction: column;
	}
	.issueImg{
		display: block;
		width: 80upx;
		height: 80upx;
		vertical-align: middle;
	}
	/* 操作问题列表 */
	.issueList{
		font-size: 24upx;
		color: #666666;
		line-height: 80upx;
		padding: 0 50upx;
	}
	 /* 操作问题每一项 */
	.issueListItme{
		width: 650upx;
		height: 36upx;
		margin-top: 40upx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.issueListItme .title {
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}
	/* 圆点 */
	.circle{
		width: 8upx;
		height: 8upx;
		background: #ccc;
		border-radius: 50%;
	}
	.issueListItme text{
		margin-left: 16upx;
	}
	.iconfanhui {
		font-size: 24upx;
		color: #999999;
	}
	/* 底部 */
	.base{
		color:#ccc;
		font-size:24upx;
		bottom: 60upx;
		text-align: center;
	}
	.base text {
		color: #FF9900 !important;
	}
	/* 灰色线 */
	.gray {
		width: 750upx;
		height: 20upx;
		background: #EEEEEE;
		margin-top: 60upx;
	}
</style>

